Ext.define('HIT.view.MdataGoodsAddPanel', {
    extend: 'Ext.form.Panel',
    alias: 'widget.mdatagoodsaddpanel',
    height: 192,
    width: 521,
    overlapHeader: false,
    preventHeader: true,
    layout: {
        type: 'absolute'
    },
    title: Share.T('添加商品'),

    initComponent: function() {
        var me = this;
        Ext.applyIf(me, {
            items: [
               {
                  xtype: 'hiddenfield',
                  id: 'mdata-functionId',
                  value: 1
               },
               {
                   xtype: 'textfield',
                   x: 10,
                   y: 20,
					width:234,
                   id: 'mdata-goods-code-add',
                   fieldLabel: Share.T('代码'),
                   maxLength : 50,
                   allowBlank: false,
                   blankText: Share.T('代码不能为空'),
                   emptyText: Share.T('请输入代码'),
                   msgTarget  : 'side'
               },
               {
                   xtype: 'textfield',
                   x: 260,
                   y: 20,
					width:234,
                   id: 'mdata-goods-name-add',
                   fieldLabel: Share.T('货物名称'),
                   maxLength : 200,
                   allowBlank: false,
                   blankText: Share.T('货物名称不能为空'),
                   emptyText: Share.T('请输入货物名称'),
                   msgTarget  : 'side'
               },
               {
                   xtype: 'textfield',
                   x: 10,
                   y: 60,
					width:234,
					maxLength : 20,
                   id: 'mdata-goods-item-add',
                   fieldLabel: Share.T('税目'),
                   emptyText: Share.T('请输入税目')
               },
               {
                   xtype: 'numberfield',
                   x: 260,
                   y: 60,
					width:234,
					hideTrigger : true,
					maxValue : 99999999.999999,
					minValue : 0.000001,
					msgTarget : 'side',
					maxText:Share.T('请输入合法有效的值'),
					minText:Share.T('请输入合法有效的值'),
					decimalPrecision : 6, // 小数位精度 
					allowNegative : false, // 不允许输入负数
                   id: 'mdata-goods-rate-add',
                   fieldLabel: Share.T('税率'),
                   emptyText: Share.T('请输入税率')
               },
               {
                   xtype: 'textfield',
                   x: 10,
                   y: 100,
					width:234,
					maxLength : 100,
                   id: 'mdata-goods-speci-add',
                   fieldLabel: Share.T('规格'),
                   emptyText: Share.T('请输入规格')
               },
               {
                   xtype: 'textfield',
                   x: 260,
                   y: 100,
					width:234,
					maxLength : 20,
                   id: 'mdata-goods-meas-add',
                   fieldLabel: Share.T('计量单位')
                   ,
                   emptyText: Share.T('请输入计量单位')
               },
               {
                   xtype: 'numberfield',
                   x: 10,
                   y: 140,
					width:234,
					hideTrigger : true,
					allowDecimals : true,
					decimalPrecision : 2, // 小数位精度 
					allowNegative : false, // 不允许输入负数
					maxValue : 99999999.99,
					minValue : 0.01,
					msgTarget : 'side',
					maxText:Share.T('请输入合法有效的值'),
					minText:Share.T('请输入合法有效的值'),
                   id: 'mdata-goods-price-add',
                   fieldLabel: Share.T('单价'),
                   emptyText: Share.T('请输入单价')
                   
               },
               {
                   xtype: 'textfield',
                   x: 260,
                   y: 140,
					width:234,
					maxLength : 1000,
                   id: 'mdata-goods-shortcode-add',
                   fieldLabel: Share.T('简码'),
                   emptyText: Share.T('请输入简码')
               }       
            ]
        });

        me.callParent(arguments);
    }

});